Scale for fill is already present.
Adding another scale for fill, which will replace the existing scale.
frequency charts
# get graphsfor (i inc(4:9,12:15,18:21,22:32,34)) {pd =desc_get(data, get(paste0("dt",sprintf("%02d", i))), i, var_pl=T)# get tableprint(pd[2])#print(rmarkdown::paged_table(as.data.frame(pd[2])))write.table(pd[2], paste0("../tmp/haidi-table-v", sprintf("%02d", i), ".csv"), sep="\t", quot=T, row.names=F)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
library(RColorBrewer)#display.brewer.all()# custom themesome_graph <-theme(panel.grid.major=element_line(linewidth=2))some_color <-c("deeppink", "chartreuse", "midnightblue")# put the elements in a listtheme_haidi <-list(some_graph, scale_color_manual(values=some_color))theme_haidi <-list(some_graph, scale_colour_brewer(palette="Blues"))
for (i in33:34) {pl =desc_get(data, get(paste0("dt",i)), i)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
231018: descriptives
for (i in22:32) {pl =desc_get(data, get(paste0("dt",i)), i)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
for (i in18:21) {pl =desc_get(data, get(paste0("dt",i)), i)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
231017: descriptives
for (i in12:15) {pl =desc_get(data, get(paste0("dt",i)), i)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
231016: descriptives
for (i in6:9) {pl =desc_get(data, get(paste0("dt0",i)), i)}
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
`summarise()` has grouped output by 'v35_country'. You can override using the
`.groups` argument.
# write.table(data, "../csv/haidi-dk-2.tsv", sep="\t", quot=T, row.names=F)# transform data to wide (10 content units * 28 content vars)data = data |>pivot_wider(id_cols=coder_id, names_from=some, values_from=c(3:30)) |>select(-coder_id)# data
`summarise()` has grouped output by 'content_id'. You can override using the
`.groups` argument.
# A tibble: 60 × 3
# Groups: content_id [40]
content_id coder_id count
<chr> <chr> <int>
1 DK001 A 1
2 DK001 B 1
3 DK002 A 1
4 DK002 B 1
5 DK003 A 1
6 DK003 B 1
7 DK004 A 1
8 DK004 B 1
9 DK005 A 1
10 DK005 B 1
# … with 50 more rows
# write.table(data, "../csv/haidi-fi.tsv", sep="\t", quot=T, row.names=F)# transform data to wide (10 content units * 28 content vars)data = data |>pivot_wider(id_cols=coder_id, names_from=some, values_from=c(3:30)) |>select(-coder_id)# data
# write.table(data, "../csv/haidi-dk.tsv", sep="\t", quot=T, row.names=F)# transform data to wide (10 content units * 28 content vars)data = data |>pivot_wider(id_cols=coder_id, names_from=some, values_from=c(3:30)) |>select(-coder_id)# data
# write.table(data, "../csv/haidi-se.tsv", sep="\t", quot=T, row.names=F)# transform data to wide (10 content units * 28 content vars)data = data |>pivot_wider(id_cols=coder_id, names_from=some, values_from=c(3:30)) |>select(-coder_id)# data
# A tibble: 10 × 6
coder_id content_id x1 x3 x9 x10
<chr> <int> <chr> <dbl> <dbl> <chr>
1 a 1 S001 102 99 Dolda larmsiffrorna: Så dåligt mår 85-…
2 a 2 S002 103 99 Satsningar som räddar liv
3 a 3 S003 102 99 Detta måste ni rätta till i vården, po…
4 a 4 S004 101 99 Sju utmaningar - därför är det kris i …
5 a 5 S005 104 99 De kommande årens satsningar sker i pr…
6 b 1 S006 102 0 De har full koll på senioren
7 b 2 S007 103 99 Mossig kritik mot vårdappar
8 b 3 S008 101 99 Folksjukdomar som kan förvärras i spår…
9 b 4 S009 101 99 Så vill regeringen möta utmaningarna i…
10 b 5 S010 105 99 Tekniken ska avlasta personalen
# transform datadata = data |>pivot_wider(id_cols=coder_id, names_from=content_id, values_from=x3) |>select(-coder_id)# https://rpubs.com/jacoblong/content-analysis-krippendorff-alpha-Rdata
Krippendorff’s Alpha values range from -1 to 1, with 1 representing unanimous agreement between the raters, 0 indicating they’re guessing randomly, and negative values suggesting the raters are systematically disagreeing. As suggested by Krippendorff, alphas above 0.8 are considered very good agreement, and tentative conclusions can be made with data where α≥0.667
# A tibble: 10 × 5
content_id coder_id var1 var2 var3
<dbl> <chr> <dbl> <chr> <lgl>
1 1 A 1 Red FALSE
2 2 A 3 Blue TRUE
3 3 A 5 Blue TRUE
4 4 A 7 Green TRUE
5 5 A 1 Red FALSE
6 1 B 1 Red FALSE
7 2 B 3 Blue FALSE
8 3 B 3 Green FALSE
9 4 B 7 Green TRUE
10 5 B 3 Red FALSE